<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
    <title></title>
</head>
<body>
<p>
    Test 1.  Validate nested validators marked as disabled aren't processed.
</p>
<h:form id="form1">
    <h:inputText id="input" value="#{requestScope.value}">
        <f:validateLongRange maximum="10" disabled="true" />
        <f:validateLength minimum="5" />
        <f:validateDoubleRange minimum="5" disabled="true" />
    </h:inputText>
        <br />
        <h:commandButton id="sub" value="Submit" />
        <h:messages id="messages1" for="input" />
</h:form>
<p>
    Test 2.  Nested validator disable status takes precedence over wrapped validators.
    First input field disables the validator, so no messages should appear over the
    HR.  The second field doesn't have a validator.  Surrounding both fields is
    a length validator with a minimum of 5.
</p>
<h:form id="form2">
    <f:validateLength minimum="5">
        <h:inputText id="input1" value="#{requestScope.value1}">
            <f:validateLength disabled="true" />
        </h:inputText>
        <h:inputText id="input2" value="#{requestScope.value2}" />
    </f:validateLength>
    <h:commandButton id="sub" value="Submit" />
    <h:messages id="messages2" for="input1" />
    <hr />
    <h:messages id="messages3" for="input2" />
</h:form>
</body>
</html>
